home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_300
/
355_02
/
slk2.exe
/
SPP
/
SPP.H
< prev
next >
Wrap
C/C++ Source or Header
|
1991-06-09
|
3KB
|
115 lines
/*
New Sherlock Preprocessor -- Main header file.
Source: spp.h
Started: September 26, 1987
Version: May 31, 1988; July 15, 1988
PUBLIC DOMAIN SOFTWARE
Sherlock, including the SPP, SDEL and SDIF programs, was placed in
the public domain on June 15, 1991, by its author,
Edward K. Ream
166 North Prospect Ave.
Madison, WI 53705.
(608) 257-0802
Sherlock may be used for any commercial or non-commercial purpose.
DISCLAIMER OF WARRANTIES
Edward K. Ream (Ream) specifically disclaims all warranties,
expressed or implied, with respect to this computer software,
including but not limited to implied warranties of merchantability
and fitness for a particular purpose. In no event shall Ream be
liable for any loss of profit or any commercial damage, including
but not limited to special, incidental consequential or other damages.
*/
/*
Define which compiler will be used to compile the program.
Typically, a command line option will be used to define these
constants.
TURBOC use Turbo C compiler.
MICRO_SOFT use version 4.0 of MicroSoft compiler on MS DOS.
*/
/*
Compile-time options:
DEBUG Make run-time checks.
STD_DIR Name of first standard directory.
*/
#define DEBUG 1
/*
Define possible values for ch.
*/
#define END_FILE 0x1a
/*
Define flags which will be found in macro replacement texts.
These flags MUST NOT BE NEGATIVE, so as to fit in a proper char.
*/
#define ARG_FLAG 1
#define POUND_FLAG 2
#define CONCAT_FLAG 3
#define EORT 4
#define EXPAND_OFF 5
#define ARG_OFFSET '0'
/*
Miscellaneous global constants.
*/
#define ZERO (0)
#define TRUE (1)
#define FALSE (0)
#define ERROR (-1)
#define BAD_EXIT 1
#define INT_DIGITS 20 /* used by utl.c and other routines */
#define LONG_DIGITS 40 /* used by utl.c and other routines */
typedef int bool;
#ifdef MICRO_SOFT
#define FAR far
#else
#define FAR
#endif
/*
Include subsidiary header files.
SL.H MUST be included even if SHERLOCK.C is not linked in.
*/
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <process.h>
#include <sl.h>
#include "enum.h"
#include "glb.h"
#include "tmp.h"
/*
---------- PREPROCESSOR ----------
*/
#define ishex(c) (isdigit(c) || (c >= 'A' && (c <= 'F' || (c>='a' && c<='f')))
#define isid1(c) (isalpha(c) || c == '_')
#define isid2(c) (isalpha(c) || isdigit(c) || c == '_')
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#define TRACETOK(name) ENTER_TRACE(name, printf("(%s)\n", pr_tok()))
#define TRACECH(name) ENTER_TRACE(name, printf("(ch: %s)\n", pr_ch(ch)))
#define is(tok) (token == tok)